(setq abc
      '("switch"
        "case"
        "main"
        )
      )

(cdr abc)

(defun read-file-to-buffer()
  (interactive)
  (switch-to-buffer "*MemoryMap-Files*")
  (erase-buffer)
  (insert-file "d:/workspace/c/my-lib/lisp/c-mode.complete")
  )

(defun main-complete()
  (interactive)
  ;get token with about to expand
  (setq sPoint (point))
  (backward-word)
  (setq ePoint (point))
  (setq temp (buffer-substring-no-properties ePoint sPoint))
  (print temp)
  (setq tempLength (length temp))
  (print tempLength)

  (setq flags 0)
  (setq endFlags (length abc))
  (switch-to-buffer "*main-complete")
  (erase-buffer)
  (while (< flags endFlags)
    (setq selectItem (nth flags abc))
    (print selectItem)
    (setq whileString (substring selectItem 0 tempLength))
    (print whileString)
    (if (string= temp whileString)
        (cond ((insert selectItem)
               (move-end-of-line nil)
               (newline-and-indent)))
      )
    (setq flags (+ flags 1))
    )
  )

(defun get-variable-test(a b &optional c)
  (print a)
  (print b)
  (print c)
  )

(get-variable-test 1 2)